<@html.doctype />
<html>
    <@html.head> 
    <link rel="stylesheet" type="text/css" href="../includes/styles/skins/Green/layout/css/layout_news.css" />
     <link rel="stylesheet" type="text/css" href="${base}/includes/styles/skins/Green/layout/css/nth_match.css" />
    <link rel="stylesheet" type="text/css" href="${base}/includes/styles/skins/Green/layout/css/nth_apply.css" />
    <link href="${base}/includes/plugins/jquerylib/ligerUI/skins/Aqua/css/ligerui-form.css" rel="stylesheet" type="text/css" />
    <link href="${base}/includes/plugins/jquerylib/ligerUI/skins/Silvery/css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../includes/js/jsLayout/tishi.js"></script>
    <script src="${base}/includes/plugins/jquerylib/jquery/jquery-1.3.2.min.js" type="text/javascript">
    </script>
    <script src="${base}/includes/plugins/jquerylib/ligerUI/js/core/base.js" type="text/javascript">
    </script>
    <script src="${base}/includes/plugins/jquerylib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript">
    </script>
    <script type="text/javascript">
    	  var str = true;
    	function checknumber(){
                var value = $(this).val().trim();
				var patrn = /^[0-9]+$/;
                if (value == null || value == ""||patrn.test(value)) {
					 $(this).next("span").hide();
				}                   
                else  if(!patrn.test(value)) {
                        $(this).next("span").show();
						str=false;
				}           
        }
		function checkNull(){
				var value = $(this).val().trim();
				if(value==""||value==null){
					if($(this).is("textarea"))
					$(this).parent("p").next("p").find("span").show();
					else
					 $(this).next("span").show();
				} 
				  else
				  $(this).next("span").hide();
			}
        $(function(){
            $("#endDate").ligerDateEditor();
            $(":input.require").focus(function(){
                $("#tip").hide();
            });
            $("#compName").blur(function(){
                if (this.value.trim() == "" || this.value == null) {
                    $("#tipName").show();
                }
                else 
                    $("#tipName").hide();
            });
            $(".number").keyup(checknumber).blur(checknumber);
			
            $(":input.require").blur(checkNull).focus(function(){
                if ($(this).is("textarea")) 
                    $(this).parent("p").next("p").find("span").hide();
                else 
                    $(this).next("span").hide();
            });
		});
        function checkform(){
          str = true;
            $(":input.require").each(function(){
                if (this.value == null || this.value.trim() == "") {
                    str = false;
                    $("#tip").show();
                }
            });
			 $(".number").each(checknumber);
            return str;
        }
    </script>
    </@html.head>
    <body>
        <@html.header></@html.header><@html.content>
        <div id="content">
            <@html.contentplace place="大赛-》申请" /> 
            <div id="apply_content">
                <div id="apply_content_left">
                    <form name="form1" class="editPart" method="post" enctype="multipart/form-data" action="${base}/match/compApp.action" id="form1">
                     
						<h2><span class="personal_title">填写申请表</span><span class="message_requried">*为必填项</span></h2>
                        <div class="personal_message">
                            <p class="text">
                                <label>
                                    大赛种类<i>&nbsp;*&nbsp;</i>
                                </label>
                                <select name="compApp.ptype.typeID" class="require" id="statue">
                                    <#if matchTypeList?exists>
	                                    <#list matchTypeList as matchtype>
	                                    	<option value="${matchtype.typeID}">${matchtype.type}</option>
	                                    </#list>
                                    </#if> 
                                </select>
                            </p>
                            <p>
                                <label>
                                    大赛名称<i>&nbsp;*&nbsp;</i>
                                </label>
                                <input name="compApp.compName" type="text" class="require" id="compName" /><span id="tipName" class="formtips onError" style="display:none;">大赛名称不能为空</span>
                            </p>
                            <p>
                                <label>
                                    大赛简介<i>&nbsp;*&nbsp;</i>
                                </label>
                                <textarea name="compApp.compSummary" class="require" cols="50" rows="3" id="compSummary">
                                </textarea>
                            </p>
							<p>
                                <label>
                                   &nbsp;&nbsp;
                                </label>
								<input type="hidden">
                                <span id="sum" class="formtips onError" style="display:none;">请输入大赛简介</span>
								</input>
                            </p>
                            <p>
                                <label>
                                    大赛详情<i>&nbsp;*&nbsp;</i>
                                </label>
                                <textarea name="compApp.compDetail" class="require" cols="50" rows="6" id="compDetail">
                                </textarea>
                            </p>
							<p>
                                <label>
                                   &nbsp;&nbsp;
                                </label>
								<input type="hidden">
                                <span class="formtips onError" style="display:none;">请输入大赛详情</span>
								</input>
                            </p>
                            <p class="text">
                                <label>
                                    预计金额&nbsp;&nbsp;&nbsp;
                                </label>
                                <input type="text" class="number" tabindex=1 name="compApp.cMoney" placeholder="0" id="cMoney"/><span id="tip1" style="display:none;" class="formtips onError">请输入正确的数字</span>
                            </p>
                            <p class="text">
                                <label>
                                    已有金额&nbsp;&nbsp;&nbsp;
                                </label>
                                <input type="text" class="number" tabindex=1 name="compApp.ownMoney" placeholder="0" id="ownMoney"/><span id="tip1" style="display:none;" class="formtips onError">请输入正确的数字</span>
                            </p>
                            <p class="text">
                                <label>
                                    截止日期<i>&nbsp;*&nbsp;</i>
                                </label>
                                <input name="compApp.appEndDate" class="require" type="text" id="endDate" ltype="date" />
								<p>                              
                                <span class="formtips onError" style="display:none;">请选择日期</span>
                            </p>
                            </p>
							
                            <p class="text">
                                <label>
                                    报名方式<i>&nbsp;*&nbsp;</i>
                                </label>
                                <input name="compApp.appPattern" type="text" class="require" id="appPattern" tabindex=1/>
                                <span class="formtips onError" style="display:none;">请输入报名方式</span>
                            </p>
                            </p>
                            <p class="text">
                                <label>
                                    大赛负责人<i>&nbsp;*&nbsp;</i>
                                </label>
                                <input name="compApp.applierName" class="require" type="text" id="applierName" tabindex=1/>
								<span class="formtips onError" style="display:none;">请输入负责人姓名</span>
                            </p>
                            <p class="text">
                                <label>
                                    联系方式<i>&nbsp;*&nbsp;</i>
                                </label>
                                <input name="compApp.community" class="require" type="text" id="community" tabindex=1 />
								<span class="formtips onError" style="display:none;">请输入联系名方式</span>
                            </p>
                            <p class="text">
                                <label>
                                    增添附件&nbsp;&nbsp;&nbsp;
                                </label>
                                <input name="uploadFile" type="file" id="uploadFile" tabindex=1 />
                            </p>                            
                            <p class="text">
                                <input name="cmtsubmit" type="submit" onClick="return checkform();" id="compsubmit" class="submit" tabindex="5" value="提交"/>
                            </p>
                            <p class="text">
                                <span id="tip" class="formtips onError" style="display:none;">必填字段不得为空</span>
                            </p>
                            <p class="text">
                                <@s.actionmessage/><@s.actionerror/>
                            </p>
                        </div>
                    </form>
                </div>
                <div id="news_right_content">
        <div id="news_search">
          <form action="1.php" id="news_form">
          <input type="text" name="search"  id="search_1" placeholder="搜索新闻">
          <input type="submit" name value=" " id="search_2">
          </form>
        </div>
        
        
        <div id="news_tags">
           <div id="tags_title">
             <p>热门标签</p>
           </div>
           <div id="tags_con">
            
                    <ul>
                        <li>
                                                        <a href="${base}/match/toCompApp.action">
                                                            申请大赛
                                                        </a>
                                                    </li>
                                                    <li>
                                                        <a href="${base}/match/toCompAudit.action">
                                                            审核申请表
                                                        </a>
                                              </li>
                <li>交互设计 +</li>
                 <li>摄影印象 +</li>
                 <li>技术沙龙 +</li>
                 <li>用户研究 +</li>
                 <li>视觉设计 +</li>
							                                        
                    </ul>
					
           </div>
        </div>
        
        
        <div id="news_cat">
            <div id="cat_title"><p>竞赛公告</p></div>
            <div id="cat_con">
             <marquee onmouseover=this.stop() onmouseout=this.start() 
                  		trueSpeed scrollAmount="1" scrollDelay="30" direction=down>
                <ul class="tishi">
                <#if compResultList?exists>  
							 <#list compResultList as result>
							  <li>
							  	<a href="${base}/match/showResult.action?compId=${result.compID}" title="header=[竞赛公告] body=[${result.resultTitle!}]">
                                      ${result.resultTitle?substring(0,12)}...
                                   </a></li>
							 </#list>
					 </#if>    
                
              </ul>
              </marquee>
            </div>
        </div>
    </div>
</div>
</div>
</@html.content>

<@html.bottom>
	<!--请不要在此处添加内容-->
</@html.bottom>

</body>
</html>